package com.yulin.security_redis.mapper;

import com.yulin.security_redis.bean.Menu;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MenuMapper {

    /*
        @Select("select m.*,r.`id` as rid,r.`name` as rname,r.`nameZh` as rnamezh from menu m left join menu_role mr on m.`id`=mr.`mid` left join role r on mr.`rid`=r.`id` WHERE m.`enabled`=true order by m.`id` desc")
    */
    List<Menu> getAllMenu();

    List<Menu> getMenusByHrId(Long id);
}
